﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IBatisNet.DataMapper;

namespace EIA.Basic.DAL.IBatis
{
    public class DASession : IDASession
    {
        ISqlMapper _sqlMapper = null;

        public DASession(ISqlMapper sqlMapper)
        {
            _sqlMapper = sqlMapper;
        }

        public void BeginTransaction()
        {
            _sqlMapper.BeginTransaction();
        }

        public void CommitTransaction()
        {
            _sqlMapper.CommitTransaction(true);
        }

        public void RollbackTransaction()
        {
            _sqlMapper.RollBackTransaction(true);
        }
    }
}
